﻿// 1.1.5.04. Sort 3 real values in descending order using nested if statements.

using System;

class SortingThreeNums
{
    static void Main()
    {
        Begin:
        double firstValue = double.Parse(Console.ReadLine());
        double secondValue = double.Parse(Console.ReadLine());
        double thirdValue = double.Parse(Console.ReadLine());

        Console.WriteLine();

        if (firstValue > secondValue)
        {
            if (firstValue > thirdValue)
            {
                Console.WriteLine(firstValue);
                if (secondValue > thirdValue)
                {
                    Console.WriteLine(secondValue);
                    Console.WriteLine(thirdValue);
                }
                else
                {
                    Console.WriteLine(thirdValue);
                    Console.WriteLine(secondValue);
                }
            }
            else
            {
                Console.WriteLine(thirdValue);
                Console.WriteLine(firstValue);
                Console.WriteLine(secondValue);
            }
        }
        else // first < second
        {
            if (secondValue > thirdValue)
            {
                Console.WriteLine(secondValue);
                if (firstValue > thirdValue)
                {
                    Console.WriteLine(firstValue);
                    Console.WriteLine(thirdValue);
                }
                else
                {
                    Console.WriteLine(thirdValue);
                    Console.WriteLine(firstValue);
                }
            }
            else
            {
                Console.WriteLine(thirdValue);
                if (firstValue > secondValue)
                {
                    Console.WriteLine(firstValue);
                    Console.WriteLine(secondValue);
                }
                else
                {
                    Console.WriteLine(secondValue);
                    Console.WriteLine(firstValue);
                }
            }
        }
        Console.WriteLine();
        goto Begin;
    }
}